package top.leix.springdemo.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 实验室表
 * @TableName lab
 */
@TableName(value ="lab")
@Data
public class Lab implements Serializable {
    /**
     * 实验室编号
     */
    @TableField(value = "labID")
    private String labID;

    /**
     * 设备数
     */
    @TableField(value = "deviceNum")
    private Integer deviceNum;

    /**
     * 实验室类别
     */
    @TableField(value = "labType")
    private Object labType;

    /**
     * 管理员
     */
    @TableField(value = "monitor")
    private String monitor;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Lab other = (Lab) that;
        return (this.getLabID() == null ? other.getLabID() == null : this.getLabID().equals(other.getLabID()))
            && (this.getDeviceNum() == null ? other.getDeviceNum() == null : this.getDeviceNum().equals(other.getDeviceNum()))
            && (this.getLabType() == null ? other.getLabType() == null : this.getLabType().equals(other.getLabType()))
            && (this.getMonitor() == null ? other.getMonitor() == null : this.getMonitor().equals(other.getMonitor()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getLabID() == null) ? 0 : getLabID().hashCode());
        result = prime * result + ((getDeviceNum() == null) ? 0 : getDeviceNum().hashCode());
        result = prime * result + ((getLabType() == null) ? 0 : getLabType().hashCode());
        result = prime * result + ((getMonitor() == null) ? 0 : getMonitor().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", labID=").append(labID);
        sb.append(", deviceNum=").append(deviceNum);
        sb.append(", labType=").append(labType);
        sb.append(", monitor=").append(monitor);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}